<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>客户管理</title>
    <%@include file="common.jsp" %>
    <script type="text/javascript" src="/static/js/views/client.js"></script>
</head>
<body>
<!-- 数据表格 -->
<table id="client_datagrid"></table>
<!-- 新增编辑对话框 -->
<div id="client_dialog">
    <form id="client_form" method="post">
        <input type="hidden" name="id"/>
        <div align="center" style="margin-top: 15px;">
            <table>
                <tr>
                    <td>
                        用户名&nbsp;&nbsp;&nbsp;:<input class="easyui-textbox" name="username"
                                                     data-options="prompt: '用户名',required:true"/>
                    </td>
                    <td>
                        客户类型:<select class="easyui-combobox" name="clienttype"
                                     data-options="prompt: '请选择',required:true"
                                     style="width:145px;">
                        <option value="1">公司法人</option>
                        <option value="0">个人</option>
                    </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        真实姓名:<input class="easyui-textbox" name="realname"
                                    data-options="label:'',prompt: '真实姓名',labelPosition: 'left',required:true"/>
                    </td>
                    <td>
                        证件类型:<input class="easyui-textbox" name="idcardtype"
                                    data-options="label:'',prompt: '证件类型',labelPosition: 'left',required:true"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        证件号码:<input class="easyui-textbox" name="idcardnumber"
                                    data-options="label:'',prompt: '证件号码',labelPosition: 'left',required:true"/>
                    </td>
                    <td>
                        性别&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:<select class="easyui-combobox" name="gender"
                                                                       data-options="prompt: '请选择',required:true"
                                                                       style="width:150px;">
                        <option value="1">男</option>
                        <option value="0">女</option>
                    </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        电话号码:<input class="easyui-textbox" name="phonenumber"
                                    data-options="label:'',prompt: '电话号码',labelPosition: 'left',required:true"/>
                    </td>
                    <td>
                        邮箱&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:<input class="easyui-textbox" name="email"
                                                                      data-options="label:'',prompt: '邮箱',labelPosition: 'left',required:true,validType:'email'"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        地址&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:<input class="easyui-textbox" name="address"
                                                                      data-options="label:'',prompt: '地址',labelPosition: 'left',required:true"/>
                    </td>
                    <td>
                        是否投保人:<select class="easyui-combobox" name="applicant"
                                      data-options="prompt: '请选择',required:true"
                                      style="width:132px;">
                        <option value="1">车主</option>
                        <option value="0">投保人</option>
                        <option value="-1">被投保人</option>
                    </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        客户等级:<select class="easyui-combobox" name="clientlevel"
                                     data-options="prompt: '请选择',required:true"
                                     style="width:143px;">
                        <option value="1">高级</option>
                        <option value="0">中等</option>
                        <option value="-1">普通</option>
                    </select>
                    </td>
                    <td>
                        客户来源:<input class="easyui-textbox" name="origin"
                                    data-options="label:'',prompt: '客户来源',labelPosition: 'left',required:true"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        备注&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:<input class="easyui-textbox" name="remark"
                                                                      data-options="label:'',prompt: '备注',labelPosition: 'left',required:true"/>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</div>
<!--跟进客户对话框-->
<div id="followupBill_dialog">
    <form id="followupBill_form" method="post">
        <input type="hidden" name="id">
        <div align="center" style="margin-top: 10px;">
            <div>
                <input type="text" name="content" class="easyui-textbox"
                       data-options="label:'跟进内容:',labelPosition:'top', width:150">
            </div>
            <div>
                <input type="text" name="conclusion" class="easyui-textbox"
                       data-options="label:'跟进总结:',labelPosition:'top', width:150">
            </div>
            <div>
                <input type="text" name="feedback" class="easyui-textbox"
                       data-options="label:'客户反馈:',labelPosition:'top', width:150">
            </div>
            <div>
                <input type="text" name="client.id" class="easyui-textbox"
                       data-options="label:'客户:',labelPosition:'top', width:150">
            </div>
        </div>
    </form>
</div>
<!--移交客户对话框-->
<div id="transferBill_dialog">
    <form id="transferBill_form" method="post">
        <input type="hidden" name="id">
        <div align="center" style="margin-top: 10px;">
            <div>
                <input type="hidden" name="client.id"/>
                <input type="text" name="client.realname" class="easyui-textbox"
                       data-options="label:'被移交的客户:',labelPosition:'top', width:150">
            </div>
            <div>
                <input type="hidden" name="transfer.id"/>
                <input type="text" name="transfer.realname" class="easyui-textbox"
                       data-options="label:'移交人:',labelPosition:'top', width:150">
            </div>
            <div>
                <select name="receiver.id" class="easyui-combobox"
                        data-options="
						 width:150,
						 label:'接收人:',
						 labelPosition:'top',
						 valueField:'id',
						 textField:'realname',
						 url:'/employee/selectAll'
						">
                </select>
            </div>
            <div>
                <input type="text" name="transferofreason" class="easyui-textbox"
                       data-options="label:'移交原因:',labelPosition:'top', width:150">
            </div>
        </div>
    </form>
</div>
<%--高级查询对话框--%>
<div id="queryCondition_dialog">
    <form id="queryCondition_form" method="post">
        <div align="center" style="margin-top: 30px">
            <div style="margin-top: 5px">
                最小时间:<input type="text" name="minDate" class="easyui-datebox" data-options="prompt: '--请选择--'"> </input>
            </div>
            <div style="margin-top: 5px">
                最大时间:<input type="text" name="maxDate" class="easyui-datebox" data-options="prompt: '--请选择--'"> </input>
            </div>
            <div style="margin-top: 5px">
                客户状态:<select class="easyui-combobox" name="clientStatusCondition"
                             data-options="prompt: '--请选择--'" style="width:150px;">
                <option value="1">正式客户</option>
                <option value="0">潜在客户</option>
                <option value="-1">无效客户</option>
            </select>
            </div>
            <div style="margin-top: 5px">
                客户类型:<select class="easyui-combobox" name="clienttypeCondition"
                             data-options="prompt: '--请选择--'"
                             style="width:150px;">
                <option value="1">公司法人</option>
                <option value="0">个人</option>
            </select>
            </div>
            <div style="margin-top: 5px">
                客户性质:<select class="easyui-combobox" name="applicantCondition"
                             data-options="prompt: '--请选择--'" style="width:150px;">
                <option value="1">车主</option>
                <option value="0">投保人</option>
                <option value="-1">被投保人</option>
            </select>
            </div>
            <div style="margin-top: 5px">
                客户等级:<select class="easyui-combobox" name="clientlevelCondition"
                             data-options="prompt: '--请选择--'" style="width:150px;">
                <option value="1">高级</option>
                <option value="0">中等</option>
                <option value="-1">普通</option>
            </select>
            </div>
            <div style="margin-top: 5px">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;性别:<select class="easyui-combobox" name="genderCondition"
                                                                     data-options="prompt: '--请选择--'"
                                                                     style="width:150px;">
                <option value="1">男</option>
                <option value="0">女</option>
            </select>
            </div>
        </div>
    </form>
</div>
<div id="client_excelUpload">
    <form id="client_excelUpload_form" method="post" enctype="multipart/form-data">
        <table>
            <tbody>
            <tr>
                <td><input type="file" name="excel"/></td>
                <td><a href="javascript:void(0);" onclick="window.open('/client/downloadTemplate')">下载模板</a> </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<!-- 数据表格CRUD按钮 -->
<div id="client_datagrid_tb">
    <div>
        <a class="easyui-linkbutton" iconCls="icon-edit" plain="true" data-cmd="followup">客户跟进</a>
        <a class="easyui-linkbutton" iconCls="icon-redo" plain="true" data-cmd="formal">转正</a>
        <a class="easyui-linkbutton" iconCls="icon-no" plain="true" data-cmd="invalid">无效</a>
        <a class="easyui-linkbutton" iconCls="icon-remove" plain="true" data-cmd="transfer">移交</a>
        <a class="easyui-linkbutton" iconCls="icon-add" plain="true" data-cmd="putPool">放入资源池</a>
    </div>
    <div>
        <a class="easyui-linkbutton" iconCls="icon-add" plain="true" data-cmd="add">新增</a>
        <a class="easyui-linkbutton" iconCls="icon-edit" plain="true" data-cmd="edit">编辑</a>
        <a class="easyui-linkbutton" iconCls="icon-remove" plain="true" data-cmd="del">删除</a>
        <a class="easyui-linkbutton" iconCls="icon-reload" plain="true" data-cmd="reload">刷新</a>
        <a class="easyui-linkbutton" iconCls="icon-add" plain="true" data-cmd="moreCondition">高级查询</a>
        <a class="easyui-linkbutton" iconCls="icon-reload" plain="true"
           onclick="window.open('/client/downloadExcel')">Excel导出</a>
        <a class="easyui-linkbutton" iconCls="icon-reload" plain="true" data-cmd="excelImport">Excel导入</a>
    </div>
    <div>
        <input id="searchBtn" type="text">
    </div>
</div>
<!-- 客户新增修改对话框保存取消按钮 -->
<div id="client_dialog_bt">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="save">保存</a>
    <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancel">取消</a>
</div>
<!--客户跟进对话框保存取消按钮-->
<div id="followupBill_dialog_bt">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="saveBill">保存</a>
    <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancelBill">取消</a>
</div>
<!-- 移交对话框底部按钮 -->
<div id="transferBill_dialog_bt">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="saveTransferBill">保存</a>
    <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="cancelTransferBill">取消</a>
</div>
<!-- 高级查询对话框底部按钮 -->
<div id="queryCondition_dialog_bt">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="queryConditionCommit">查询</a>
    <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="queryConditionCancel">取消</a>
</div>
<!-- excel导出对话框底部按钮 -->
<div id="client_excelUpload_bt">
    <a class="easyui-linkbutton" iconCls="icon-save" plain="true" data-cmd="excelSave">导入</a>
    <a class="easyui-linkbutton" iconCls="icon-cancel" plain="true" data-cmd="excelCancel">取消</a>
</div>
</body>
</html>